<?php
declare (strict_types = 1);

namespace app\common\model;

class Activation extends Base
{
    protected $name = 'activation';

    protected function user()
    {
        return $this->hasOne(User::class, 'id', 'uid')->field('id,code,nickname');
    }

    protected function area()
    {
        return $this->hasOne(Area::class, 'code', 'city')->field('code,province,city');
    }

    protected function level()
    {
        return $this->hasOne(Level::class, 'id', 'level_id');
    }
}
